<div class="g-bd clearfix">
    <?php echo $this->render('index/left.phtml');?>
    <!-- 主栏 -->
    <div class="g-mn">
    	<div class="w-blk0 w-blk-pdlshow">
            <h1 class="blk0h2 f-iblk clearfix">
            <span class="spbg blkhdl"><a href="<?php echo MY_URL?>">Home</a> &gt; UP TO 80% OFF DEALS!</span>
                <span class="spbg blkhdr">
                	&nbsp;
                </span>                    
            </h1>
			<div class="black-friday-show">
				<style>
			      #fancyCountdown{width:440px;margin:10px auto 5px auto;}
			      .flashBuyH2{margin:20px 0px 10px 0px;text-align:center;font-size:15px;color:#333;}
			      .hourminute{width:440px;margin:5px auto;}
			      .hourminute div{float:left;text-align:center;font-weight:bold;}
			      .important-notice{padding:10px;}
			      .important-notice div{margin:5px;line-height:16px;}
			      .important-notice span{color:red;font-size:14px;font-weight:bold;}
			      .qanda .item{padding:15px;line-height:16px;}
			      .qanda h2{padding:20px 0px 0px 15px;font-size:15px;}
			      
			      .pshare{padding:5px 10px; border-bottom:1px #999 dashed;}
				  .pshare div{margin:10px 0px;}
				  .pshare h2{font-size:15px;color:red;}
				  .moreitem{font-weight:bold;color:green;}
				  .noitem{font-weight:bold;color:red;}
				</style>
				<link type="text/css" rel="stylesheet" href="<?php echo MY_URL;?>/css/countdown/jquery.counter-analog2.css"/>
				<a name="wheneverauthor">&nbsp;</a>
				<div id="timingDiv">
					<?php if($this->timeType == 'end'):?>
					<h2 class="flashBuyH2">The 80% OFF SALE will end in:</h2>
					<?php else:?>
					<h2 class="flashBuyH2">The 80% OFF SALE will start in:</h2>
					<?php endif;?>
					<div class="show-img counter-analog2" id="fancyCountdown">
					
					</div>
					<div class="hourminute clearfix">
						<div style="width:141px;">Hours</div>
						<div style="width:160px;">Minutes</div>
						<div style="width:137px;">Seconds</div>
					</div>
				</div>
				<script type="text/javascript" src="<?=MY_URL?>/html/scripts/countdown/jquery.fancyCountdown.min.js?v=2"></script>
				<script>
				 $('#fancyCountdown').counter({
		          	initial: "<?php echo $this->hours;?>:<?php echo $this->minutes;?>:<?php echo $this->seconds;?>",
			        direction: 'down',
			        format: "23:59:59",
			        interval: 1000,
			        stop: "00:00:00"
		        });
				$('#fancyCountdown').bind('counterStop', function() {
				    window.location.reload();window.location.href=window.location.href;
				});
				</script>
				<div class="blkbody" id="gagaDealDiv" style="margin-top:10px;">
					<div class="important-notice">
						<div>1. It is free shipping to America, West Europe &amp; Oceania for all gaga deals item, treated the same as other items.</div>
						<div>2. GaGa Deals items may come from any hot product category available on bestcheapjerseydeal.com, and each round may have as much as 4 new deals.</div>
					</div>
					<?php if(count($this->items)>0):?>
	            	<ul class="clearfix">
                      <?php foreach ($this->items as $value):?>
	                    	<li>
	                        	<div class="prd simg"><img alt="<?php echo $value['subject'];?>" title="<?php echo $value['keywords'];?>" src="<?php echo MY_URL;?>/<?php echo $value['cut_url'];?>" /></div>
	                            <div class="prd spname"><a href="<?php echo $this->url($value['itemid']);?>" title="<?php echo str_replace("\"",'',$value['description']);?>"><?php echo $value['subject'];?></a></div>
    							<div class="prd sprice"><a class="sprice spbg f-blk"><?php if($value['is_suit']==1):?><strong>Team-buying Discount</strong><?php else:?>Price <span class="delete">$<?php echo $value['m_org_price'];?></span> <strong>$<?php echo $value['max_price'];?></strong><?php endif;?></a></div>
	                            <div><a class="f-blk pboxbar spbg" href="<?php echo $this->url($value['itemid']);?>" title="<?php echo $value['subject'];?>">&nbsp;</a></div>
	                        </li>
	                <?php endforeach;?> 
	                    <?php foreach ($this->curFlashItem  as $value):?>
	                    	<li>
	                        	<div class="prd simg"><img alt="<?php echo $value['subject'];?>" title="<?php echo $value['keywords'];?>" src="<?php echo MY_URL;?>/<?php echo $value['cut_url'];?>" /></div>
	                            <div class="prd spname"><a href="<?php echo $this->url($value['itemid']);?>" title="<?php echo str_replace("\"",'',$value['description']);?>"><?php echo $value['subject'];?></a></div>
	                            <div class="prd sprice"><a class="sprice spbg f-blk"><?php if($value['is_suit']==1):?><strong>Team-buying Discount</strong><?php else:?>Price <span class="delete">$<?php echo $value['m_org_price'];?></span> <strong>$<?php echo $value['max_price'];?></strong><?php endif;?></a></div>
	                            <div><a class="f-blk pboxbar spbg" href="<?php echo $this->url($value['itemid']);?>" title="<?php echo $value['subject'];?>">&nbsp;</a></div>
	                        </li>
	                    <?php endforeach;?>
	                    <li>
                        	<?php if($this->gagaItemCount>0):?>
                        	<div class="prd simg"><img src="<?php echo MY_URL?>/images/mlm/clickmore.jpg"></div>
                        	<div class="prd moreitem"><span><?php echo $this->gagaItemCount;?></span> <span>Deal<?php if($this->gagaItemCount>1):?>s<?php endif;?></span> Available</div>
                            <?php else:?>
                            <div class="prd simg"><img src="<?php echo MY_URL?>/images/mlm/addmore.jpg"></div>
                            <div class="prd noitem"><span>0</span> Deal Available</div>
                            <?php endif;?>
                            <div><a class="f-blk pboxbar spbg" href="#" id="addMoreItem">&nbsp;</a></div>
                            <div style="font-size:10px;padding:2px 0px;"><a href="#howtogetlucky">(?) Get deals via earning plan</a></div>
                            <div style="font-size:10px;padding:2px 0px;"><a href="#howtogetlucky">(?) Make 1 order, get 10 deals</a></div>
                        </li>
	                </ul>
	                <?php else:?>
	                	<ul class="clearfix">
	                    	<li>
					            <div class="prd simg"><img src="<?php echo MY_URL?>/images/flashimg.jpg"></div>
					            <div class="prd spname"><a>Guess what's this</a></div>
					            <div class="prd sprice"><a>Price <strong>$19.99</strong></a></div>
					        </li>
					        <li>
					            <div class="prd simg"><img src="<?php echo MY_URL?>/images/flashimg.jpg"></div>
					            <div class="prd spname"><a>Guess what's this</a></div>
					            <div class="prd sprice"><a>Price <strong>$19.99</strong></a></div>
					        </li>
					        <li>
					            <div class="prd simg"><img src="<?php echo MY_URL?>/images/flashimg.jpg"></div>
					            <div class="prd spname"><a>Guess what's this</a></div>
					            <div class="prd sprice"><a>Price <strong>$23.99</strong></a></div>
					        </li>
					        <li>
					            <div class="prd simg"><img src="<?php echo MY_URL?>/images/flashimg.jpg"></div>
					            <div class="prd spname"><a>Guess what's this</a></div>
					            <div class="prd sprice"><a>Price <strong>$23.99</strong></a></div>
					        </li>
					        <li>
	                        	<?php if($this->gagaItemCount>0):?>
	                        	<div class="prd simg"><img src="<?php echo MY_URL?>/images/mlm/clickmore.jpg"></div>
	                        	<div class="prd moreitem"><span><?php echo $this->gagaItemCount;?></span> <span>Deal<?php if($this->gagaItemCount>1):?>s<?php endif;?></span> Available</div>
	                            <?php else:?>
	                            <div class="prd simg"><img src="<?php echo MY_URL?>/images/mlm/addmore.jpg"></div>
	                            <div class="prd noitem"><span>0</span> Deal Available</div>
	                            <?php endif;?>
	                            <div><a class="f-blk pboxbar spbg" href="#" id="addMoreItem">&nbsp;</a></div>
	                            <div style="font-size:10px;padding:2px 0px;"><a href="#howtogetlucky">(?) Get deals via earning plan</a></div>
	                            <div style="font-size:10px;padding:2px 0px;"><a href="#howtogetlucky">(?) Make 1 order, get 10 deals</a></div>
	                        </li>
	                	</ul>
	                <?php endif;?>
	            </div>
	            <div style="text-align:center;padding-top:20px;"><a class="f-iblk" style="padding:10px 20px;background-color:#E00000;color:#fff;font-size:18px;" href="#wheneverauthor" id="clickToStartWhenEver">Wanna gaga the $19.99 jerseys right now???? NO TIME LIMIT!</a></div>
	            <div class="blkbody f-hide" style="margin-top:10px;">
	            	<ul class="clearfix" id="wheneverItemDiv">
	            		
	            	</ul>
	            </div>
	            <div class="qanda">
	            	<h2>GAGA Deals F.A.Q</h2>
	            	<div class="item">
	            		<h3>1. How many deals are there every day?</h3>
	            		<div>There are three rounds every day(12:00 am - 01:00 pm PDT, 07:00 pm - 08:00 pm PDT, 10:00 pm - 11:00 pm PDT) and each round may have as much as 4 new deals.</div>
	            	</div>
	            	<div class="item">
	            		<h3>2. Can I always order the GaGa Deals I see?</h3>
	            		<div>GaGa Deals products are exclusively priced items with limited stock. Orders may be placed until the stock lasts. Only orders placed in the "GaGa Deals" section of bestcheapjerseydeal.com may enjoy GaGa Deals promotional prices. All items are on a first-come, first-served basis.</div>
	            	</div>
	            	<div class="item">
	            		<h3>3. After I place an order, what do I do next?</h3>
	            		<div>Please complete payment for your order within 24 hours. If the payment is not completed within 24 hours, the order will be cancelled. Payment should only be made with the existing payment method available on bestcheapjerseydeal.com. <a href="http://www.bestcheapjerseydeal.com/bulletin-more-itemid-1267/About_Payment/">Learn more</a>.</div>
	            	</div>
	            	<div class="item">
	            		<h3>4. Is there a limit on how many GaGa Deals orders I can place?</h3>
	            		<div>Glad to tell you it is no limitation.</div>
	            	</div>
	            	<div class="item">
	            		<h3>5. What kinds of products do GaGa Deals include?</h3>
	            		<div>We work hard to find great-value items you'll love. GaGa Deals items may come from any hot product category available on bestcheapjerseydeal.com.</div>
	            	</div>
	            	<div class="item">
	            		<h3>6. Can I return a GaGa Deals item?</h3>
	            		<div>Yes. GaGa Deal items are treated the same as other items on bestcheapjerseydeal.com. Please see our <a href="http://www.bestcheapjerseydeal.com/bulletin-more-itemid-1270/365_Days_Return_Policy/">365 days return policy</a> for details. </div>
	            	</div>
	            	
	            	<br />
	            	<a name="howtogetlucky"></a>
	            	<h2>Lucky Deals F.A.Q</h2>
	            	<div class="item">
	            		<h3>1. What is lucky deal?</h3>
	            		<div>Basically there are 4 deals in each section of gaga deal. Lucky deal offers bonus items, which means there is more choice for our members in each round.</div>
	            	</div>
	            	<div class="item">
	            		<h3>2. How does lucky deal work?</h3>
	            		<div>After you get the lucky deals, click “+” button. Let’s say you have got 2 lucky deal. Then you will see 6 new items in this round of gaga deal. Like the original 4 items, lucky deal items are also exclusively priced items coming from any hot product category available on bestcheapjerseydeal.com.</div>
	            	</div>
	            	<div class="item">
	            		<h3>3. How can I get lucky deals?</h3>
	            		<div>
	            			Quite easy. There are two ways for you to join.
	            			<br />
	            			1. Make 1 order, get 10 deals. You will get 10 lucky deal once your order is successful.
	            			<br />
	            			2. Purchase lucky deal via our earning plan. 10 lucky deals just cost 1 credits(1 credits = $1). <a href="/bring-a-friend-and-earn-with-us" target="_blank" style="text-decoration:underline;">Click here to learn more about our plan.</a>
	            		</div>
	            	</div>
	            	<div class="item">
	            		<h3>4. When shall I use the lucky deals?</h3>
	            		<div>You can use it immediately or save them for another time.</div>
	            	</div>
	            	<div class="item">
	            		<h3>5. Is there any limit on the number of lucky deals I can get?</h3>
	            		<div>Glad to tell you there is no limit.</div>
	            	</div>
	            </div>
	        </div>
	        
	     </div>
    </div>
</div>
<textarea id="addMoreItemArea" class="f-hide">
	
</textarea>
<script>
$(function(){
	$('#clickToStartWhenEver').click(function(){
		$.post(ROOT_PATH+"/flash-wheneveritems",{},function(data) {
			$('#wheneverItemDiv').html(data);
			var p = $('#wheneverItemDiv').parent();
			var pp = $('#wheneverItemDiv').parent().prev();
			var ppp = $('#wheneverItemDiv').parent().prev().prev();
			p.slideDown();
			pp.hide();
			ppp.slideUp();
			$('#timingDiv').slideUp();
		});
	});
	$('#addMoreItem').click(function(){
		<?php if($this->member_type=="buyer"):?>
		var _prev = $(this).parent().prev();
		if(_prev.hasClass('noitem')){
			$.post(ROOT_PATH+"/flash-showorder",{},function(data) {
				if($.trim(data)!=''){
					GGSHOP.msgBox.show('Add More Lucky Deals',data,'650','434','349');
					GGSHOP.msgBox.content.css({"left":($(window).width()-459)/2+"px", "top": $(document).scrollTop(), "z-index": 9999999});
					$('#buyBtn').unbind();
					$('#selectMoney').unbind();
					$('#buyBtn').click(function(){
						if(confirm("Confirm to pay "+$('#selectMoney').val()/10+" credits for the new deals?")){
							var _itemCount = $('#selectMoney').val();
							GGSHOP.msgBox.hidden();
							$.post(ROOT_PATH+"/flash-payforitem",{itemCount:_itemCount},function(data) {
								if(data > 0){ 
									_prev.removeClass('noitem');
									_prev.addClass('moreitem');
									var _spans = _prev.find('span');
									var _count = parseInt($(_spans[0]).html())+parseInt(data);
									_prev.parent().find('img').attr('src','/images/mlm/clickmore.jpg');
									$(_spans[0]).html(_count);
									if(_count>1){
										$(_spans[1]).html('items');
									}
								}else{
									alert('some errors.');
								}
							});	
						}
					});
					$('#selectMoney').change(function(){
						if($(this).val()==-1){
							$(this).val(1);
						}
					});
				}
			});
		}else{
			<?php if(count($this->items)>0):?>
			$.post(ROOT_PATH+"/flash-subtractitem",{},function(data) {
				if($.trim(data)!=''){
					var _spans = _prev.find('span');
					var _count = parseInt($(_spans[0]).html())-1;
					if(_count <= 0){
						_count = 0;
						_prev.parent().find('img').attr('src','/images/mlm/addmore.jpg');
						_prev.removeClass('moreitem');
						_prev.addClass('noitem');
					}
					$(_spans[0]).html(_count);
					if(_count=1){
						$(_spans[1]).html('item');
					}
					_prev.parent().before(data)
				}
			});
			<?php else:?>
				GGSHOP.msgBox.show('ERROR', 'You can\'t add a deal until the gaga deal starts.');
			<?php endif;?>
		}
		<?php else:?>
		window.location.href="/auth-login?preurl=%2Fflash-index";
		<?php endif;?>
		return false;
	});	
});

</script>